requireJS(['constant', 'site', 'handlebars','public'], function (Constant, site, Handlebars,Public) {

    Constant.initHandlebars(Handlebars)
    //日期控件初始化
    $(".datepicker").datepicker({
        format: 'yyyy-mm-dd',
        autoclose: true,
        pickerPosition: 'bottom',
    })
    var url = {
        selectLoanMethodList: "manager/selectLoanMethodList.do"
    }

    //渲染搜索框的贷款方式
    site.send({
        url: url.selectLoanMethodList,
        callback: function (data) {
            data = JSON.parse(data);
            if (data.type == '1') {
                var source = $("#loanMethod_list_tpl").html();
                var template = Handlebars.compile(source);
                var list = data
                var html = template(list)
                $('#loan_way').append(html);
            }
        }
    })

    var init = function () {
        // site.send({
        //     url: '',//正常还款列表
        //     //async:false
        //     callback: function (data) {
        //         var list = JSON.parse(data);
        var data = {};

        var source = $("#repayment_content_tpl").html();

        var template = Handlebars.compile(source);
        var html=template(data);

        $("#repayment_content").html(html);

        Public.record('t_order_public')
        //     }
        // })


    }
    init();
})